﻿using MediatR;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using SC.GirdManage.Common;
using SC.GridManage.API.Read.Application.command.LogicGrid;

namespace SC.GridManage.API.Read.Controllers
{
    /// <summary>
    /// 逻辑网格- 读-控制器
    /// </summary>
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class LogicGridController : ControllerBase
    {
        private readonly IMediator mediator;

        public LogicGridController(IMediator mediator)
        {
            this.mediator = mediator;
        }
        [HttpGet]
        public Task<ApiResult<List<GetLogicGridDTO>>> QueryLogicGrid([FromQuery]GetLogicGridListCommand request)
        {
            return mediator.Send(request);
        }
    }
}
